{include /common/header}
<form action="{:plugin_url('/config/admin/edit')}" method="POST">
    <fieldset>
        <legend>编辑配置项</legend>

        <div class="form-group">
            <label>分组</label>
            <input type="text" class="form-control" name="group" value="{$config.group}" required>
        </div>

        <div class="form-group">
            <label>标题</label>
            <input type="text" class="form-control" name="title" value="{$config.title}" required>
        </div>

        <div class="form-group">
            <label>键</label>
            <input type="text" class="form-control" name="name" value="{$config.name}" required>
        </div>

        <div class="form-group">
            <label>类型</label>
            <select class="form-control" name="type" required>
                <option value="text" {if $config['type'] == 'text'}selected{/if}>单行文本</option>
                <option value="textarea" {if $config['type'] == 'textarea'}selected{/if}>多行文本</option>
                <option value="bool" {if $config['type'] == 'bool'}selected{/if}>布尔</option>
            </select>
        </div>

        <div class="form-group">
            <label>备注</label>
            <input type="text" class="form-control" name="tips" value="{$config.tips}">
        </div>

        <div class="form-group">
            <label>排序</label>
            <input type="number" class="form-control" name="weight" value="{$config.weight}">
        </div>

        <input type="hidden" name="id" value="{$config.id}">
        <button type="submit" class="btn btn-primary">提交</button>
        
    </fieldset>
</form>
{include /common/footer}